#define _CRT_SECURE_NO_WARNINGS

#include "SeqList.h"

void SeqListTest1()
{
	SeqList sl;
	SeqListInit(&sl);
	
	SeqListPushBack(&sl, 0);
	SeqListPushBack(&sl, 1);
	SeqListPushBack(&sl, 2);
	SeqListPushBack(&sl, 3);
	SeqListPushBack(&sl, 4);
	SeqListPushBack(&sl, 5);

	SeqListPushFront(&sl, -1);
	SeqListPushFront(&sl, -2);
	SeqListPushFront(&sl, -3);
	SeqListPushFront(&sl, -4);

	SeqListPrint(&sl);

	SeqListDestory(&sl);
}

void SeqListTest2()
{
	SeqList sl;
	SeqListInit(&sl);

	SeqListPushBack(&sl, 0);
	SeqListPushBack(&sl, 1);
	SeqListPushBack(&sl, 2);
	SeqListPushBack(&sl, 4);
	SeqListPushBack(&sl, 5);
	SeqListPushBack(&sl, 6);

	SeqListPopBack(&sl);
	SeqListPopBack(&sl);
	SeqListPopBack(&sl);
	SeqListPopBack(&sl);
	//SeqListPopBack(&sl);
	//SeqListPopBack(&sl);
	//SeqListPopBack(&sl);

	SeqListPopFront(&sl);
	SeqListPopFront(&sl);

	SeqListDestory(&sl);

	SeqListPrint(&sl);
}

void SeqListTest3()
{
	SeqList sl;
	SeqListInit(&sl);

	SeqListPushBack(&sl, 0);
	SeqListPushBack(&sl, 1);
	SeqListPushBack(&sl, 2);
	SeqListPushBack(&sl, 4);
	SeqListPushBack(&sl, 5);
	SeqListPushBack(&sl, 6);

	SeqListInsert(&sl, 3, 3);
	SeqListInsert(&sl, 5, 8);
	SeqListPrint(&sl);

	SeqListErase(&sl, 5);
	SeqListErase(&sl, 2);
	SeqListPrint(&sl);

	SeqListDestory(&sl);
}

int main()
{
	//SeqListTest1();
	//SeqListTest2();
	SeqListTest3();

	return 0;
}